import React,{Component} from 'react'
import {is,fromJS} from 'immutable'
import {NavLink,Switch,Route,Redirect} from 'react-router-dom'
import PublicHeader from '@/components/header/header.jsx'
import './record.less'

class Record extends Component{
  constructor(props){
    super(props)
  }

  render = () =>{
    return(
      <main className="common-con-top">
        <PublicHeader title="记录"/>
        <section className="record-nav-con">
          <nav className="record-nav-con">
            <NavLink to={`${this.props.match.path}/passed`}className="nav-link">已通过</NavLink>
            <NavLink to={`${this.props.match.path}/audited`} className="nav-link">待审核</NavLink>
            <NavLink to={`${this.props.match.path}/failed`} className="nav-link">未通过</NavLink>
          </nav>
          <i className="nav-flag-bar" style={{left:this.state.flagBarPos}}></i>  
        </section>
        {/* 嵌套路由          */}

        {/* 
        <Switch>
          <Route path={`${this.props.match.path}/:type`} component={RecordList}></Route>
          <Redirect from={`${this.props.match.path}`} to={`${this.props.match.path}/passed`} exact component={RecordList}></Redirect>
        </Switch>
        */}
      </main>
    )
    
  }
}

export default Record;